OBJS = compass.o maestro.o gotemp.o gps_boat.o config.o pot_field.o SickLMS.o SickLMSMessage.o SickLMSBufferMonitor.o main.o
CC = g++
DEBUG = -g
CFLAGS = -Wall -c $(DEBUG)
LFLAGS = -Wall -lgps $(DEBUG)

all:
	make exp_main; rm *.o

exp_main : $(OBJS)
	$(CC) $(LFLAGS) $(OBJS) -o exp_main -lgps

maestro.o : maestro.h maestro.cpp
	$(CC) $(CFLAGS) maestro.cpp

compass.o : compass.h compass.cpp
	$(CC) $(CFLAGS) compass.cpp

gotemp.o : gotemp.h gotemp.cpp
	$(CC) $(CFLAGS) gotemp.cpp

gps_boat.o : gps_boat.h gps_boat.cpp
	$(CC) $(CFLAGS) gps_boat.cpp -lgps

config.o : config.h config.cpp
	$(CC) $(CFLAGS) config.cpp

pot_field.o : pot_field.h pot_field.cpp
	$(CC) $(CFLAGS) pot_field.cpp

SickLMS.o : SickLMS.cc
	$(CC) $(CFLAGS) SickLMS.cc

SickLMSMessage.o : SickLMSMessage.cc
	$(CC) $(CFLAGS) SickLMSMessage.cc

SickLMSBufferMonitor.o : SickLMSBufferMonitor.cc
	$(CC) $(CFLAGS) SickLMSBufferMonitor.cc

main.o : main.cpp main.h
	$(CC) $(CFLAGS) main.cpp -lgps 

clean:
	\rm *.o *~ exp_main
